home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-01 | 3.4 KB | 119 lines | [TEXT/ttxt] |
- NewHelp-c.sit.hqx - Think C 7
- -----------------
-
- This is an itty bitty bytes(tm) rendition of the 1989 help demo
- by R. Fronabarger. Translated from Pascal and mucked about by
- Kenneth A. Long, somewhere between then and 1 December 1995.
-
- It was free and still is.
-
- Neither demo checked, or checks, for color, though they use some
- color 'styl' resources.
-
- The content of THIS help demo is the CTools(tm) help bank of data.
- I got this thing done for that purpose, so I thought I'd let y'all
- have the C version (I revived the Pascal one and posted to a.s.m.
- last year).
-
- Be forwarned! It has bugs! If you fix them, PLEASE post an update.
- Nothing serious, though. Seems to exit on it's own, sometimes. I
- had trouble with the 'CNTL' resourse, so replaced it with NewControl.
- I also had trouble with the modal handlings, so the bugs are in there.
-
- ALL other help modules I looked at were too complicated. Let's do
- our programming toward simpility! Okay?
-
- Off my soap box, I composed the help content in ClarisWorks, then
- copy/paste between it and ResEdit. If you make new 'TEXT' and 'styl'
- resources, this is easy. Open the new, empty 'TEXT' and NOT the
- 'styl' resource and paste into it. Drag-select something from your
- word processor, copy, click-switch to the 'TEXT' picker in ResEdit,
- hit Command K, Command V, Command I, TAB, type in a name for the
- resource, Command W, Command W, click-switch back to your WP.
-
- If you do Command K in the 'style' resource, instead, the resource
- names will go to labelling the 'TEXT' resources and NOT the 'styl'!
- So paste styled text into the 'TEXT' resources and the other will be
- auto-created WITH labels.
-
- The resource names are important because they are what you use to
- create the proper 'STR#' resource which is used for the subject list.
-
- To do this, open the resource you created containing 'TEXT'/'styl'
- resource with ResTools 3.0, using the Decompile menu item. Then
- decompile all the 'TEXT' resources and nothing else. Save the text
- file generated as fileName.r. Quit ResTools and open the file with
- a text editor.
-
- Remove everything in the file except the resource header lines.
-
- Example:
-
- userdefined resource 'TEXT' (128 , "Header")
- userdefined resource 'TEXT' (129 , "Descrpit.")
- userdefined resource 'TEXT' (130 , "Data")
-
- Replace All instances of:
-
- userdefined resource 'TEXT' (
-
- with:
-
- /*
-
- Replace All instances of:
-
- ,
-
- with:
-
- */
-
- Then, replace all instances of:
-
- ")
-
- with:
-
- ";
-
- Thos will leve you with your string list WITH their ID numbers:
-
- /* 128 */ "Header";
- /* 129 */ "Descrpit";
- /* 130 */ "Data";
-
- Quit and reopen the file with ResTools 3.0. Select 'STR#' from the
- Templates menu, at the top of the file:
-
- resource 'STR#' (128) {
- "These are Pascal strings";
- "Enter as many as you like";
- "All are preceeded by their length"
- };
-
- /* 128 */ "Header";
- /* 129 */ "Descrpit.";
- /* 130 */ "Data";
-
- Now, simply make your list fit this template and compile:
-
- resource 'STR#' (128) {
- /* 128 */ "Header";
- /* 129 */ " Descrpit.";
- /* 130 */ " Data"
- };
-
- The above has been indented to show sub-categories.
-
- The 'HLP#' resource is simple. You just put in the ID, twice,
- of each entry in your 'TEXT'/'styl' combo. - one for each set.
- Click on the asterisks, hit Command K for as many of them as you
- have, put the insertion point in the first one, type the ID, hit
- TAB, type it again, hit TAB, type the next, hit TAB, etc., etc.
-
- Enjoy!
-
- -Ken-
-
- ---------------------------------------------------------------